<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - AI 智享生活管家</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <link href="../css/custom.css" rel="stylesheet">
</head>
<body class="bg-gray-50">
    <!-- 状态栏 -->
    <div class="status-bar">
        <img src="../images/status-bar.png" alt="状态栏" class="w-full h-full object-cover">
    </div>

    <!-- 内容区域 -->
    <div class="content-area">
        <!-- Logo区域 -->
        <div class="px-8 pt-12 pb-8 text-center">
            <i class="fas fa-robot text-6xl text-blue-500"></i>
            <h1 class="text-2xl font-bold mt-4">AI 智享生活管家</h1>
            <p class="text-gray-500 mt-2">让AI为您的生活添彩</p>
        </div>

        <!-- 登录表单 -->
        <div class="px-8">
            <form id="loginForm" class="space-y-4">
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">手机号码</label>
                    <div class="relative">
                        <input type="tel" 
                               class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
                               placeholder="请输入手机号码">
                        <button type="button" class="absolute right-2 top-2 text-sm text-blue-500">获取验证码</button>
                    </div>
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">验证码</label>
                    <input type="text" 
                           class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
                           placeholder="请输入验证码">
                </div>
                <button type="button" 
                        onclick="handleLogin()"
                        class="w-full bg-blue-500 text-white py-2 rounded-lg mt-6">
                    登录
                </button>
            </form>

            <!-- 其他登录方式 -->
            <div class="mt-8">
                <div class="relative">
                    <div class="absolute inset-0 flex items-center">
                        <div class="w-full border-t border-gray-200"></div>
                    </div>
                    <div class="relative flex justify-center text-sm">
                        <span class="px-2 bg-gray-50 text-gray-500">其他登录方式</span>
                    </div>
                </div>
                <div class="mt-6 grid grid-cols-3 gap-4">
                    <button class="flex flex-col items-center">
                        <i class="fab fa-weixin text-2xl text-green-500"></i>
                        <span class="text-xs mt-1 text-gray-600">微信</span>
                    </button>
                    <button class="flex flex-col items-center">
                        <i class="fab fa-qq text-2xl text-blue-500"></i>
                        <span class="text-xs mt-1 text-gray-600">QQ</span>
                    </button>
                    <button class="flex flex-col items-center">
                        <i class="fas fa-envelope text-2xl text-red-500"></i>
                        <span class="text-xs mt-1 text-gray-600">邮箱</span>
                    </button>
                </div>
            </div>

            <!-- 用户协议 -->
            <div class="mt-6 text-center text-sm text-gray-500">
                登录即表示同意
                <a href="#" class="text-blue-500">用户协议</a>
                和
                <a href="#" class="text-blue-500">隐私政策</a>
            </div>
        </div>
    </div>

    <script>
        // 处理登录逻辑
        function handleLogin() {
            // 模拟登录成功
            localStorage.setItem('isLoggedIn', 'true');
            // 跳转到首页
            window.location.href = 'home.html';
        }

        // 检查登录状态
        document.addEventListener('DOMContentLoaded', () => {
            const isLoggedIn = localStorage.getItem('isLoggedIn') === 'true';
            if (isLoggedIn) {
                window.location.href = 'home.html';
            }
        });
    </script>
</body>
</html> 
